﻿using Hxj.Data;
using Hxj.Data.Common;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Utility.Models
{
    /// <summary>
	/// 实体类model_Donate 。(属性说明自动提取数据库字段的描述信息)
	/// </summary>
	[Serializable]
    public class model_Donate : Entity
    {
        public model_Donate() : base("model_Donate") { }

        #region Model
        private int _ID;
        private int? _NodeID;
        private int? _PublishmentSystemID;
        private string _AddUserName;
        private string _LastEditUserName;
        private string _WritingUserName;
        private DateTime? _LastEditDate;
        private int? _Taxis;
        private string _ContentGroupNameCollection;
        private string _Tags;
        private int? _SourceID;
        private int? _ReferenceID;
        private string _IsChecked;
        private int? _CheckedLevel;
        private int? _Comments;
        private int? _Photos;
        private int? _Hits;
        private int? _HitsByDay;
        private int? _HitsByWeek;
        private int? _HitsByMonth;
        private DateTime? _LastHitsDate;
        private string _SettingsXML;
        private string _Title;
        private string _IsTop;
        private DateTime? _AddDate;
        private DateTime? _Deadline;
        private decimal? _Target;
        private decimal? _Obtain;
        private string _Abstract;
        private string _ImageUrl;
        private string _Description;
        private string _Items;
        private string _FAQ;
        private int? _Choice;
        /// <summary>
        /// 
        /// </summary>
        public int ID
        {
            get { return _ID; }
            set
            {
                this.OnPropertyValueChange(_.ID, _ID, value);
                this._ID = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? NodeID
        {
            get { return _NodeID; }
            set
            {
                this.OnPropertyValueChange(_.NodeID, _NodeID, value);
                this._NodeID = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? PublishmentSystemID
        {
            get { return _PublishmentSystemID; }
            set
            {
                this.OnPropertyValueChange(_.PublishmentSystemID, _PublishmentSystemID, value);
                this._PublishmentSystemID = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string AddUserName
        {
            get { return _AddUserName; }
            set
            {
                this.OnPropertyValueChange(_.AddUserName, _AddUserName, value);
                this._AddUserName = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string LastEditUserName
        {
            get { return _LastEditUserName; }
            set
            {
                this.OnPropertyValueChange(_.LastEditUserName, _LastEditUserName, value);
                this._LastEditUserName = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string WritingUserName
        {
            get { return _WritingUserName; }
            set
            {
                this.OnPropertyValueChange(_.WritingUserName, _WritingUserName, value);
                this._WritingUserName = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? LastEditDate
        {
            get { return _LastEditDate; }
            set
            {
                this.OnPropertyValueChange(_.LastEditDate, _LastEditDate, value);
                this._LastEditDate = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? Taxis
        {
            get { return _Taxis; }
            set
            {
                this.OnPropertyValueChange(_.Taxis, _Taxis, value);
                this._Taxis = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ContentGroupNameCollection
        {
            get { return _ContentGroupNameCollection; }
            set
            {
                this.OnPropertyValueChange(_.ContentGroupNameCollection, _ContentGroupNameCollection, value);
                this._ContentGroupNameCollection = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Tags
        {
            get { return _Tags; }
            set
            {
                this.OnPropertyValueChange(_.Tags, _Tags, value);
                this._Tags = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? SourceID
        {
            get { return _SourceID; }
            set
            {
                this.OnPropertyValueChange(_.SourceID, _SourceID, value);
                this._SourceID = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? ReferenceID
        {
            get { return _ReferenceID; }
            set
            {
                this.OnPropertyValueChange(_.ReferenceID, _ReferenceID, value);
                this._ReferenceID = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string IsChecked
        {
            get { return _IsChecked; }
            set
            {
                this.OnPropertyValueChange(_.IsChecked, _IsChecked, value);
                this._IsChecked = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? CheckedLevel
        {
            get { return _CheckedLevel; }
            set
            {
                this.OnPropertyValueChange(_.CheckedLevel, _CheckedLevel, value);
                this._CheckedLevel = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? Comments
        {
            get { return _Comments; }
            set
            {
                this.OnPropertyValueChange(_.Comments, _Comments, value);
                this._Comments = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? Photos
        {
            get { return _Photos; }
            set
            {
                this.OnPropertyValueChange(_.Photos, _Photos, value);
                this._Photos = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? Hits
        {
            get { return _Hits; }
            set
            {
                this.OnPropertyValueChange(_.Hits, _Hits, value);
                this._Hits = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? HitsByDay
        {
            get { return _HitsByDay; }
            set
            {
                this.OnPropertyValueChange(_.HitsByDay, _HitsByDay, value);
                this._HitsByDay = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? HitsByWeek
        {
            get { return _HitsByWeek; }
            set
            {
                this.OnPropertyValueChange(_.HitsByWeek, _HitsByWeek, value);
                this._HitsByWeek = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? HitsByMonth
        {
            get { return _HitsByMonth; }
            set
            {
                this.OnPropertyValueChange(_.HitsByMonth, _HitsByMonth, value);
                this._HitsByMonth = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? LastHitsDate
        {
            get { return _LastHitsDate; }
            set
            {
                this.OnPropertyValueChange(_.LastHitsDate, _LastHitsDate, value);
                this._LastHitsDate = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string SettingsXML
        {
            get { return _SettingsXML; }
            set
            {
                this.OnPropertyValueChange(_.SettingsXML, _SettingsXML, value);
                this._SettingsXML = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Title
        {
            get { return _Title; }
            set
            {
                this.OnPropertyValueChange(_.Title, _Title, value);
                this._Title = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string IsTop
        {
            get { return _IsTop; }
            set
            {
                this.OnPropertyValueChange(_.IsTop, _IsTop, value);
                this._IsTop = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? AddDate
        {
            get { return _AddDate; }
            set
            {
                this.OnPropertyValueChange(_.AddDate, _AddDate, value);
                this._AddDate = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? Deadline
        {
            get { return _Deadline; }
            set
            {
                this.OnPropertyValueChange(_.Deadline, _Deadline, value);
                this._Deadline = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? Target
        {
            get { return _Target; }
            set
            {
                this.OnPropertyValueChange(_.Target, _Target, value);
                this._Target = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? Obtain
        {
            get { return _Obtain; }
            set
            {
                this.OnPropertyValueChange(_.Obtain, _Obtain, value);
                this._Obtain = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Abstract
        {
            get { return _Abstract; }
            set
            {
                this.OnPropertyValueChange(_.Abstract, _Abstract, value);
                this._Abstract = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ImageUrl
        {
            get { return _ImageUrl; }
            set
            {
                this.OnPropertyValueChange(_.ImageUrl, _ImageUrl, value);
                this._ImageUrl = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Description
        {
            get { return _Description; }
            set
            {
                this.OnPropertyValueChange(_.Description, _Description, value);
                this._Description = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Items
        {
            get { return _Items; }
            set
            {
                this.OnPropertyValueChange(_.Items, _Items, value);
                this._Items = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string FAQ
        {
            get { return _FAQ; }
            set
            {
                this.OnPropertyValueChange(_.FAQ, _FAQ, value);
                this._FAQ = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? Choice
        {
            get { return _Choice; }
            set
            {
                this.OnPropertyValueChange(_.Choice, _Choice, value);
                this._Choice = value;
            }
        }
        #endregion

        #region Method
        /// <summary>
        /// 获取实体中的标识列
        /// </summary>
        public override Field GetIdentityField()
        {
            return _.ID;
        }
        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        public override Field[] GetPrimaryKeyFields()
        {
            return new Field[] {
                _.ID};
        }
        /// <summary>
        /// 获取列信息
        /// </summary>
        public override Field[] GetFields()
        {
            return new Field[] {
                _.ID,
                _.NodeID,
                _.PublishmentSystemID,
                _.AddUserName,
                _.LastEditUserName,
                _.WritingUserName,
                _.LastEditDate,
                _.Taxis,
                _.ContentGroupNameCollection,
                _.Tags,
                _.SourceID,
                _.ReferenceID,
                _.IsChecked,
                _.CheckedLevel,
                _.Comments,
                _.Photos,
                _.Hits,
                _.HitsByDay,
                _.HitsByWeek,
                _.HitsByMonth,
                _.LastHitsDate,
                _.SettingsXML,
                _.Title,
                _.IsTop,
                _.AddDate,
                _.Deadline,
                _.Target,
                _.Obtain,
                _.Abstract,
                _.ImageUrl,
                _.Description,
                _.Items,
                _.FAQ,
                _.Choice};
        }
        /// <summary>
        /// 获取值信息
        /// </summary>
        public override object[] GetValues()
        {
            return new object[] {
                this._ID,
                this._NodeID,
                this._PublishmentSystemID,
                this._AddUserName,
                this._LastEditUserName,
                this._WritingUserName,
                this._LastEditDate,
                this._Taxis,
                this._ContentGroupNameCollection,
                this._Tags,
                this._SourceID,
                this._ReferenceID,
                this._IsChecked,
                this._CheckedLevel,
                this._Comments,
                this._Photos,
                this._Hits,
                this._HitsByDay,
                this._HitsByWeek,
                this._HitsByMonth,
                this._LastHitsDate,
                this._SettingsXML,
                this._Title,
                this._IsTop,
                this._AddDate,
                this._Deadline,
                this._Target,
                this._Obtain,
                this._Abstract,
                this._ImageUrl,
                this._Description,
                this._Items,
                this._FAQ,
                this._Choice};
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(IDataReader reader)
        {
            this._ID = DataUtils.ConvertValue<int>(reader["ID"]);
            this._NodeID = DataUtils.ConvertValue<int?>(reader["NodeID"]);
            this._PublishmentSystemID = DataUtils.ConvertValue<int?>(reader["PublishmentSystemID"]);
            this._AddUserName = DataUtils.ConvertValue<string>(reader["AddUserName"]);
            this._LastEditUserName = DataUtils.ConvertValue<string>(reader["LastEditUserName"]);
            this._WritingUserName = DataUtils.ConvertValue<string>(reader["WritingUserName"]);
            this._LastEditDate = DataUtils.ConvertValue<DateTime?>(reader["LastEditDate"]);
            this._Taxis = DataUtils.ConvertValue<int?>(reader["Taxis"]);
            this._ContentGroupNameCollection = DataUtils.ConvertValue<string>(reader["ContentGroupNameCollection"]);
            this._Tags = DataUtils.ConvertValue<string>(reader["Tags"]);
            this._SourceID = DataUtils.ConvertValue<int?>(reader["SourceID"]);
            this._ReferenceID = DataUtils.ConvertValue<int?>(reader["ReferenceID"]);
            this._IsChecked = DataUtils.ConvertValue<string>(reader["IsChecked"]);
            this._CheckedLevel = DataUtils.ConvertValue<int?>(reader["CheckedLevel"]);
            this._Comments = DataUtils.ConvertValue<int?>(reader["Comments"]);
            this._Photos = DataUtils.ConvertValue<int?>(reader["Photos"]);
            this._Hits = DataUtils.ConvertValue<int?>(reader["Hits"]);
            this._HitsByDay = DataUtils.ConvertValue<int?>(reader["HitsByDay"]);
            this._HitsByWeek = DataUtils.ConvertValue<int?>(reader["HitsByWeek"]);
            this._HitsByMonth = DataUtils.ConvertValue<int?>(reader["HitsByMonth"]);
            this._LastHitsDate = DataUtils.ConvertValue<DateTime?>(reader["LastHitsDate"]);
            this._SettingsXML = DataUtils.ConvertValue<string>(reader["SettingsXML"]);
            this._Title = DataUtils.ConvertValue<string>(reader["Title"]);
            this._IsTop = DataUtils.ConvertValue<string>(reader["IsTop"]);
            this._AddDate = DataUtils.ConvertValue<DateTime?>(reader["AddDate"]);
            this._Deadline = DataUtils.ConvertValue<DateTime?>(reader["Deadline"]);
            this._Target = DataUtils.ConvertValue<decimal?>(reader["Target"]);
            this._Obtain = DataUtils.ConvertValue<decimal?>(reader["Obtain"]);
            this._Abstract = DataUtils.ConvertValue<string>(reader["Abstract"]);
            this._ImageUrl = DataUtils.ConvertValue<string>(reader["ImageUrl"]);
            this._Description = DataUtils.ConvertValue<string>(reader["Description"]);
            this._Items = DataUtils.ConvertValue<string>(reader["Items"]);
            this._FAQ = DataUtils.ConvertValue<string>(reader["FAQ"]);
            this._Choice = DataUtils.ConvertValue<int?>(reader["Choice"]);
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(DataRow row)
        {
            this._ID = DataUtils.ConvertValue<int>(row["ID"]);
            this._NodeID = DataUtils.ConvertValue<int?>(row["NodeID"]);
            this._PublishmentSystemID = DataUtils.ConvertValue<int?>(row["PublishmentSystemID"]);
            this._AddUserName = DataUtils.ConvertValue<string>(row["AddUserName"]);
            this._LastEditUserName = DataUtils.ConvertValue<string>(row["LastEditUserName"]);
            this._WritingUserName = DataUtils.ConvertValue<string>(row["WritingUserName"]);
            this._LastEditDate = DataUtils.ConvertValue<DateTime?>(row["LastEditDate"]);
            this._Taxis = DataUtils.ConvertValue<int?>(row["Taxis"]);
            this._ContentGroupNameCollection = DataUtils.ConvertValue<string>(row["ContentGroupNameCollection"]);
            this._Tags = DataUtils.ConvertValue<string>(row["Tags"]);
            this._SourceID = DataUtils.ConvertValue<int?>(row["SourceID"]);
            this._ReferenceID = DataUtils.ConvertValue<int?>(row["ReferenceID"]);
            this._IsChecked = DataUtils.ConvertValue<string>(row["IsChecked"]);
            this._CheckedLevel = DataUtils.ConvertValue<int?>(row["CheckedLevel"]);
            this._Comments = DataUtils.ConvertValue<int?>(row["Comments"]);
            this._Photos = DataUtils.ConvertValue<int?>(row["Photos"]);
            this._Hits = DataUtils.ConvertValue<int?>(row["Hits"]);
            this._HitsByDay = DataUtils.ConvertValue<int?>(row["HitsByDay"]);
            this._HitsByWeek = DataUtils.ConvertValue<int?>(row["HitsByWeek"]);
            this._HitsByMonth = DataUtils.ConvertValue<int?>(row["HitsByMonth"]);
            this._LastHitsDate = DataUtils.ConvertValue<DateTime?>(row["LastHitsDate"]);
            this._SettingsXML = DataUtils.ConvertValue<string>(row["SettingsXML"]);
            this._Title = DataUtils.ConvertValue<string>(row["Title"]);
            this._IsTop = DataUtils.ConvertValue<string>(row["IsTop"]);
            this._AddDate = DataUtils.ConvertValue<DateTime?>(row["AddDate"]);
            this._Deadline = DataUtils.ConvertValue<DateTime?>(row["Deadline"]);
            this._Target = DataUtils.ConvertValue<decimal?>(row["Target"]);
            this._Obtain = DataUtils.ConvertValue<decimal?>(row["Obtain"]);
            this._Abstract = DataUtils.ConvertValue<string>(row["Abstract"]);
            this._ImageUrl = DataUtils.ConvertValue<string>(row["ImageUrl"]);
            this._Description = DataUtils.ConvertValue<string>(row["Description"]);
            this._Items = DataUtils.ConvertValue<string>(row["Items"]);
            this._FAQ = DataUtils.ConvertValue<string>(row["FAQ"]);
            this._Choice = DataUtils.ConvertValue<int?>(row["Choice"]);
        }
        #endregion

        #region _Field
        /// <summary>
        /// 字段信息
        /// </summary>
        public class _
        {
            /// <summary>
            /// * 
            /// </summary>
            public readonly static Field All = new Field("*", "model_Donate");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field ID = new Field("ID", "model_Donate", "ID");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field NodeID = new Field("NodeID", "model_Donate", "NodeID");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field PublishmentSystemID = new Field("PublishmentSystemID", "model_Donate", "PublishmentSystemID");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field AddUserName = new Field("AddUserName", "model_Donate", "AddUserName");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field LastEditUserName = new Field("LastEditUserName", "model_Donate", "LastEditUserName");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field WritingUserName = new Field("WritingUserName", "model_Donate", "WritingUserName");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field LastEditDate = new Field("LastEditDate", "model_Donate", "LastEditDate");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field Taxis = new Field("Taxis", "model_Donate", "Taxis");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field ContentGroupNameCollection = new Field("ContentGroupNameCollection", "model_Donate", "ContentGroupNameCollection");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field Tags = new Field("Tags", "model_Donate", "Tags");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field SourceID = new Field("SourceID", "model_Donate", "SourceID");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field ReferenceID = new Field("ReferenceID", "model_Donate", "ReferenceID");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field IsChecked = new Field("IsChecked", "model_Donate", "IsChecked");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field CheckedLevel = new Field("CheckedLevel", "model_Donate", "CheckedLevel");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field Comments = new Field("Comments", "model_Donate", "Comments");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field Photos = new Field("Photos", "model_Donate", "Photos");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field Hits = new Field("Hits", "model_Donate", "Hits");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field HitsByDay = new Field("HitsByDay", "model_Donate", "HitsByDay");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field HitsByWeek = new Field("HitsByWeek", "model_Donate", "HitsByWeek");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field HitsByMonth = new Field("HitsByMonth", "model_Donate", "HitsByMonth");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field LastHitsDate = new Field("LastHitsDate", "model_Donate", "LastHitsDate");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field SettingsXML = new Field("SettingsXML", "model_Donate", "SettingsXML");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field Title = new Field("Title", "model_Donate", "Title");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field IsTop = new Field("IsTop", "model_Donate", "IsTop");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field AddDate = new Field("AddDate", "model_Donate", "AddDate");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field Deadline = new Field("Deadline", "model_Donate", "Deadline");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field Target = new Field("Target", "model_Donate", "Target");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field Obtain = new Field("Obtain", "model_Donate", "Obtain");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field Abstract = new Field("Abstract", "model_Donate", "Abstract");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field ImageUrl = new Field("ImageUrl", "model_Donate", "ImageUrl");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field Description = new Field("Description", "model_Donate", "Description");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field Items = new Field("Items", "model_Donate", "Items");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field FAQ = new Field("FAQ", "model_Donate", "FAQ");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field Choice = new Field("Choice", "model_Donate", "Choice");
        }
        #endregion


    }
}
